package com.bruce.pattern.creational.builder;


import lombok.Getter;
import lombok.Setter;

/**
 * Created by bruce on 2018/11/2 20:30
 */
@Setter
@Getter
public class Course {

    private String courseName;

    private String coursePPT;

    private String courseVideo;

    private String courseArticle;

    /** 问答 */
    private String courseQA;

    public Course() {

    }

    public Course(CourseBuilder builder) {
        this.courseQA = builder.courseQA;
        this.courseArticle = builder.courseArticle;
        this.courseVideo = builder.courseVideo;
        this.coursePPT = builder.coursePPT;
        this.courseName = builder.courseName;
    }

    public static class CourseBuilder {
        private String courseName;
        private String coursePPT;
        private String courseVideo;
        private String courseArticle;
        private String courseQA;

        public CourseBuilder courseName(String courseName) {
            this.courseName = courseName;
            return this;
        }

        public CourseBuilder coursePPT(String coursePPT) {
            this.coursePPT = coursePPT;
            return this;
        }

        public CourseBuilder courseVideo(String courseVideo) {
            this.courseVideo = courseVideo;
            return this;
        }

        public CourseBuilder courseArticle(String courseArticle) {
            this.courseArticle = courseArticle;
            return this;
        }

        public CourseBuilder courseQA(String courseQA) {
            this.courseQA = courseQA;
            return this;
        }

        public Course build() {
            return new Course(this);
        }


    }


}
